package com.skydonkey.controller;


import com.skydonkey.pojo.po.VideoActivity;
import com.skydonkey.pojo.vo.Result;
import com.skydonkey.service.VideoActivityService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping(path = "/act")
public class VideoActivityController {

    private static final Logger log = LoggerFactory.getLogger(VideoActivityController.class);

    @Autowired
    VideoActivityService activityService;

    @RequestMapping(path = "/video/all", method = RequestMethod.GET)
    public Result<List<VideoActivity>> getAll() {
        List<VideoActivity> allVideoActivity = activityService.getAllVideoActivity();
        log.info("/video/all getAll: " + allVideoActivity);
        return Result.success(allVideoActivity);
    }
}
